export const drawer_config = () => {
    const config = {
        show: false,
        title: "新增",
        direction: "rtl",
        size: "30%",
        labelWidth: "90px",
        messageBox: {
            status: true,
            title: "提示",
            message: "是否保存当前数据？",
            confirmButtonText: '保存',
            cancelButtonText: '放弃',
            type: 'warning', // success
            confirmEventName: "save",
            cancelEventName: null
        },
        ifSave: true,
        form: [
            {
                key: "id",
                type: "hidden",
            },
            {key: "trainName", type: "text", label: "培训名称", alert: ""},
            {key: "trainType", type: "radio", label: "培训类型", alert: "", dict: "card_type",source: "dict",},
            {label: '参与人数', key: 'inPeople',type: "text"},
            {label: '发起人', key: 'createName',type: "text"},
            {label: '未参与人数', key: 'outPeople',type: "text"},
            {label: '最高评分', key: 'score',type: "text"},
            {label: '培训起始时间', key: 'beginTime',type: "date"},
            {label: '培训截止时间', key: 'overTime',type: "date"},
        ],
        //https://github.com/yiminghe/async-validator
        rules: {
            examineName: [
                {required: true, message: '请输入考核名称', trigger: 'blur'},
            ],
            examineType: [
                {required: true, message: '请选择考核类型', trigger: 'blur'},
            ],
            inPeople: [
                {required: true, message: '请输入参与人数', trigger: 'blur'},
            ],
            createName: [
                {required: true, message: '请输入发起人', trigger: 'blur'},
            ],
            beginTime: [
                {required: true, message: '请选择培训起始时间', trigger: 'blur'},
            ],
            overTime: [
                {required: true, message: '请选择培训截止时间', trigger: 'blur'},
            ],
            outPeople: [
                {required: true, message: '请输入未参与人数', trigger: 'blur'},
            ]
        }
    }
    return config
}